﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHibernate.Mappings;

namespace Apollo.Modules.Commissioning
{
    [NHibernateEntity(Table = "CommissionService")]
    public class CommissionService : ITrackable, ICommissionApplicability, ICommissionCalculationBase
    {
        public CommissionService() { }

        [PrimaryKey]
        public virtual int Id { get; set; }

        [BelongsTo(Column = "ID_Product")]
        public virtual Product Product { get; set; }

        [BelongsTo(Column = "ID_CommissionSchema")]
        public virtual CommissionSchema CommissionSchema { get; set; }

        [Property]
        public virtual double ProcentValue { get; set; }

        [Property]
        public virtual int YearDuration { get; set; }

        [Property]
        public virtual int YearOfContract { get; set; }

        [Property]
        public virtual PaymentFrequency PaymentFrequency { get; set; }


        [BelongsTo(Column = "ID_Role")]
        public virtual Role Role { get; set; }

        [BelongsTo(Column = "ID_Position")]
        public virtual Position Position { get; set; }

        [BelongsTo(Column = "ID_Employee")]
        public virtual Employee Employee { get; set; }

        [BelongsTo(Column = "ID_Contract")]
        public virtual Contract Contract { get; set; }


        [Property]
        public virtual CommissionApplicability CommissionApplicability { get; set; }

        [Property]
        public virtual CommissionCalculationBase CalculationBase { get; set; }

        [Property]
        public virtual bool UseExtraPremiumMedical { get; set; }

        [Property]
        public virtual bool UseExtraPremiumProfessional { get; set; }

        [Property]
        public virtual bool UseExtraPremiumOther { get; set; }

        [Property]
        public virtual bool UseLoading { get; set; }

        [Property]
        public virtual bool UsePaymentFrequency { get; set; }



        [Property]
        public virtual DateTime InsertDate { get; set; }

        [Property]
        public virtual string InsertBy { get; set; }

        [Property]
        public virtual DateTime? ModifiedDate { get; set; }

        [Property]
        public virtual string ModifiedBy { get; set; }
    }

    
}
